package edu.xhu.api.user;

import edu.xhu.model.biliuser.dtos.UserInfosDto;
import edu.xhu.model.common.dtos.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import edu.xhu.api.user.fallback.UserClientFallback;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "biliuser-service", fallback = UserClientFallback.class)
public interface UserClient {
    /**
     * 获取用户的全部信息
     *
     * @param userInfosDto
     * @return
     */
    @PostMapping("/biliuser/userAllInfosByIds")
    ResponseResult<?> queryAllUserInfoByIds(@RequestBody UserInfosDto userInfosDto);

    /**
     * 获取用户的全部信息
     *
     * @param userId
     * @return
     */
    @PostMapping("/biliuser/userInfoById")
    ResponseResult<?> queryUserInfoById(@RequestParam("userId") Long userId);


    /**
     * 根据userId,获取一些响应比数据
     */
    @GetMapping("/biliuser/getRatioDataByUserId")
    ResponseResult<?> getRatioDataByUserId(@RequestParam("userId") Long userId);

    @GetMapping("/biliuser/getOne")
    ResponseResult<?> getOneUserById(@RequestParam("userId") Long userId);

}
